package com.ruoyi.bom.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bom.mapper.ErpOrderBomMapper;
import com.ruoyi.bom.domain.ErpOrderBom;
import com.ruoyi.bom.service.IErpOrderBomService;

/**
 * 订单BOMService业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-23
 */
@Service
public class ErpOrderBomServiceImpl implements IErpOrderBomService 
{
    @Autowired
    private ErpOrderBomMapper erpOrderBomMapper;

    /**
     * 查询订单BOM
     * 
     * @param salesOrderNumber 订单BOM主键
     * @return 订单BOM
     */
    @Override
    public ErpOrderBom selectErpOrderBomBySalesOrderNumber(String salesOrderNumber)
    {
        return erpOrderBomMapper.selectErpOrderBomBySalesOrderNumber(salesOrderNumber);
    }

    /**
     * 查询订单BOM列表
     * 
     * @param erpOrderBom 订单BOM
     * @return 订单BOM
     */
    @Override
    public List<ErpOrderBom> selectErpOrderBomList(ErpOrderBom erpOrderBom)
    {
        return erpOrderBomMapper.selectErpOrderBomList(erpOrderBom);
    }

    /**
     * 新增订单BOM
     * 
     * @param erpOrderBom 订单BOM
     * @return 结果
     */
    @Override
    public int insertErpOrderBom(ErpOrderBom erpOrderBom)
    {
        return erpOrderBomMapper.insertErpOrderBom(erpOrderBom);
    }

    /**
     * 修改订单BOM
     * 
     * @param erpOrderBom 订单BOM
     * @return 结果
     */
    @Override
    public int updateErpOrderBom(ErpOrderBom erpOrderBom)
    {
        return erpOrderBomMapper.updateErpOrderBom(erpOrderBom);
    }

    /**
     * 批量删除订单BOM
     * 
     * @param salesOrderNumbers 需要删除的订单BOM主键
     * @return 结果
     */
    @Override
    public int deleteErpOrderBomBySalesOrderNumbers(String[] salesOrderNumbers)
    {
        return erpOrderBomMapper.deleteErpOrderBomBySalesOrderNumbers(salesOrderNumbers);
    }

    /**
     * 删除订单BOM信息
     * 
     * @param salesOrderNumber 订单BOM主键
     * @return 结果
     */
    @Override
    public int deleteErpOrderBomBySalesOrderNumber(String salesOrderNumber)
    {
        return erpOrderBomMapper.deleteErpOrderBomBySalesOrderNumber(salesOrderNumber);
    }
}
